<template>
    <Layout>
        <Form ref="form1" :model="form1" :label-width="100">
            <Row class="query-form">
                <Col span="8">
                    <FormItem label="二级集团：">
                        <two-level-org org-code v-model="form1.twoLevelOrgCode" />
                    </FormItem>
                </Col>
                <Col span="8">
                    <FormItem label="所属单位：">
                        <company-select v-model="form1.orgName" style="width:100%" />
                        <!-- <cascaderDom ref="childOrg" @setOrgInfo="setOrgId" @setOrgname="setOrgName"
                                     :rootOrgId="companyId"
                                     :orgTree="true"></cascaderDom> -->
                    </FormItem>
                </Col>
                <Col span="8" v-if="!switchFlag">
                    <div style="float: right;">
                        <Button @click="switchQuery(true)" class="ivu-btn-switch" type="text">展开<Icon type="ios-arrow-down"/></Button>
                        <Button @click="reset" class="ivu-btn-reset">重置</Button>
                        <Button class="ivu-btn-query" icon="md-search" @click="query()">查询</Button>
                    </div>
                </Col>
                <Col span="8" v-else>
                    <FormItem label="准入类别：">
                        <Input type="text" v-model="form1.admittanceOrg"></Input>
                    </FormItem>
                </Col>
            </Row>
            <Row v-show="switchFlag" class="query-form">
                <Col span="8">
                    <FormItem label="企业名称：">
                        <Input type="text" v-model="form1.contractorName"/>
                    </FormItem>
                </Col>
                <Col span="8" offset="8">
                    <Button @click="switchQuery(false)" class="ivu-btn-switch" type="text">收起<Icon type="ios-arrow-up" /></Button>
                    <Button @click="reset" class="ivu-btn-reset">重置</Button>
                    <Button class="ivu-btn-query" icon="md-search" @click="query()">查询</Button>
                </Col>
            </Row>
            <Row class="query-form">
                <Col span="24">
                    <Button size="large" class="ivu-btn-add" icon="md-add" @click="addInfo">新增</Button>
                    <download-button :api="exportUrl" :queryForm='form1' />
                </Col>
            </Row>
        </Form>
        <Table ref='table' :height="tableHeight" size="small" :loading="loading" class="table" no-data-text="没有查询到相关数据!"
        @on-sort-change="sortChange"
               highlight-row stripe border :columns="columns1" width="100%" :data="dataTable">
        </Table>
        <Row style="margin-right:10px;">
            <Col span="24">
                <Page :total="pagedata.total" :page-size="pagedata.pageSize" @on-change="pageChange"
                      style="float: right" @on-page-size-change="pageSizeChange" :page-size-opts="pageSizeArray"
                      show-total show-sizer show-elevator/>
            </Col>
        </Row>

        <Modal :transfer=false v-model="model1" :width=700 :title="add?'相关方黑名单新增':'相关方黑名单修改'"
               @on-cancel="onCancel">
            <div>
                <Form ref='InputData' :model="InputData" :rules="ruleCustom" label-position="top">
                    <div style="line-height: 42px;">
                      <Row>
                        <Col span='11'>
                          <FormItem label='企业名称：' prop="contractorName">
                            <Input v-model="InputData.contractorName" readonly @on-focus="selectContractor"/>
                            <!--<Button slot="append" @click="selectContractor" icon="ios-search"></Button>-->
                            <!--</Input>-->
                          </FormItem>
                        </Col>
                        <Col span='11' offset="1">
                          <FormItem label='准入类别：' prop="admittanceOrg">
                            <Input v-model="InputData.admittanceOrg"/>
                          </FormItem>
                        </Col>
                      </Row>
                       <Row>
                         <Col span='11'>
                           <FormItem label='禁入开始时间：' prop="banStart">
                             <Date-picker type="date" style="width: 100%" v-model="InputData.banStart"/>
                           </FormItem>
                         </Col>
                         <Col span='11' offset="1">
                           <FormItem label='禁入结束时间：' prop="banEnd">
                             <Date-picker type="date" style="width: 100%" v-model="InputData.banEnd"/>
                           </FormItem>
                         </Col>
                       </Row>
                       <Row>
                         <Col span='23'>
                           <FormItem label='通知文件：' prop="informFile">
                             <Input v-model="InputData.informFile" type="textarea"
                                    :autosize="{minRows:2,maxRows:5}"/>
                           </FormItem>
                         </Col>
                       </Row>
                      <Row>
                        <Col span='23'>
                          <FormItem label='原因及处理结果：' prop="reasonResult">
                            <Input v-model="InputData.reasonResult" type="textarea"
                                   :autosize="{minRows:2,maxRows:5}"/>
                          </FormItem>
                        </Col>
                      </Row>
                       <Row>
                         <Col span='23'>
                           <FormItem label='备注：'>
                             <Input v-model="InputData.notes" type="textarea" :autosize="{minRows:2,maxRows:5}"/>
                           </FormItem>
                         </Col>
                       </Row>

                    </div>
                </Form>
            </div>
            <div slot="footer">
                <Button class='ivu-btn-save' :loading="buttonLoading" @click="submit('InputData')">确定</Button>
                <Button class='ivu-btn-cancel' @click="onCancel">取消</Button>
            </div>
        </Modal>

        <Modal v-model="model2" footer-hide :width=800 title="相关方台账">
            <Form ref="pageModel2" :model="pageModel2" :label-width="120">
                <Row class="query-form">
                    <i-col span="8">
                        <FormItem label="企业名称：">
                            <Input type="text" v-model="pageModel2.contractorName"/>
                        </FormItem>
                    </i-col>
                    <i-col span="16">
                        <div style="float:right">
                            <Button @click="reset" class="ivu-btn-reset">重置</Button>
                            <Button class="ivu-btn-query" icon="md-search" @click="selectContractor()">查询</Button>
                        </div>
                    </i-col>
                </Row>
                <Row>
                    <Col span="24">
                        <Table height="300" :loading="loading" size="small" class="table" no-data-text="没有查询到相关数据!"
                               highlight-row stripe border :columns="columns2" width="100%" :data="contractor">
                        </Table>
                    </Col>
                </Row>
                <Row style="margin-right:10px;">
                    <Col span="24">
                        <Page :total="pageModel2.total" :page-size="pageModel2.pageSize" @on-change="pageChange1"
                              style="float: right" @on-page-size-change="pageSizeChange1"
                              :page-size-opts="pageSizeArray"
                              show-total show-sizer show-elevator/>
                    </Col>
                </Row>
            </Form>
        </Modal>

        <Modal :transfer=false v-model="model3" :width=700 title="相关方黑名单详情" @on-cancel="onCancel" label-position="top">
            <Form :model="InputData" label-position="right">
              <div style="line-height: 42px;margin-left: 20px">
                  <Row>
                    <Col span='11'>
                      <span>企业名称：{{InputData.contractorName}}</span>
                    </Col>
                    <Col span='11' offset="1">
                      <span>准入类别：{{InputData.admittanceOrg}}</span>
                    </Col>
                  </Row>
                  <Row class="detail-background-clor">
                    <Col span='11'>
                      <span>禁入开始时间：{{banStart}}</span>
                    </Col>
                    <Col span='11' offset="1">
                      <span>禁入结束时间：{{banEnd}}</span>
                    </Col>
                  </Row>
                  <Row>
                    <Col span='23'>
                      <span><span style="font-weight: bold">通知文件：</span>{{InputData.informFile}}</span>
                    </Col>
                  </Row>
                  <Row class="detail-background-clor">
                    <Col span='23'>
                      <span><span style="font-weight: bold">原因及处理结果：</span>{{InputData.reasonResult}}</span>
                    </Col>
                  </Row>
                  <Row>
                    <Col span='23'>
                      <span><span style="font-weight: bold"> 备注：</span> {{InputData.notes}}</span>
                    </Col>
                  </Row>
              </div>
            </Form>
            <div slot="footer">
                <Button class='ivu-btn-save' @click="onCancel">关闭</Button>
            </div>
        </Modal>
        <Modal v-model="modal3" width="900" :mask-closable="false">
            <Tabs>
                <TabPane label="历史记录">
                    <Table ref='table3' :loading="loading3" border :columns="historyColumns" style="margin-top: 0px"
                           :data="infos3" width="100%" :height="500" highlight-row stripe size="small"></Table>
                </TabPane>
                <TabPane label="流程图">
                    <div style="height: 500px; overflow-y: auto; overflow-x: auto">
                        <img :src="imgUrl" >
                    </div>
                </TabPane>
            </Tabs>
            <div slot="footer" >
                <Button @click="modal3=false" class="ivu-btn-save">关闭</Button>
            </div>
        </Modal>
    </Layout>
</template>

<script>
import {Api} from '../../../api/index.js'
import {sessionStorage} from '../../../common/cacheUtils.js';
import cascaderDom from '../../../components/cascader-dom.vue';

export default {
        components: {cascaderDom},
        name: "interestedPartiesBlack",
        data() {
            return {
                exportUrl: Api.interestedPartiesBlackList + '/export',
                tableHeight: '',
                switchFlag: false,
                loading: false,
                form1: {
                    admittanceOrg: '',
                    contractorName: '',
                    orgId: '',
                    orgName: ''
                },
                pageSizeArray: [10, 20, 50],
                pagedata: {
                    total: 0,
                    pageSize: 10,
                    currentPage: 1,
                },
                dataTable: [],
                ruleCustom: {
                    admittanceOrg: [{
                        message: '  ',
                        required: true,
                        trigger: 'blue'
                    }],
                    informFile: [{
                        message: '  ',
                        required: true,
                        trigger: 'change'
                    }],
                    contractorName: [{
                        message: '  ',
                        required: true,
                        trigger: 'change'
                    }],
                    banStart: [{
                        validator: (rule, value, callback) => {
                            if (value == null || value == '' || value == undefined) {
                                callback(' ')
                            } else {
                                callback()
                            }
                        },
                        required: true,
                        trigger: 'change'
                    }],
                    banEnd: [{
                        validator: (rule, value, callback) => {
                            if (value == null || value == '' || value == undefined) {
                                callback(' ')
                            } else {
                                callback()
                            }
                        },
                        required: true,
                        trigger: 'change'
                    }],
                    reasonResult: [{
                        message: '  ',
                        required: true,
                        trigger: 'change'
                    }],
                },
                columns1: [
                    {
                        title: "序号",
                        width: 80,
                        align: "center",
                        fixed: 'left',
                        render: (h, params) => {
                            return h('span', params.index + (this.pagedata.currentPage - 1) * this.pagedata.pageSize + 1);
                        }
                    },
                    {
                        title: '状态',
                        align: 'center',
                        key: 'status',
                        minWidth: 80,
                        render:(h,params)=>{
                            let color = 'green';
                            if(params.row.procinstState == undefined || params.row.procinstState == null ||params.row.procinstState == 2){
                                color = 'red';
                            }
                            return h('div', [
                                h('span', {
                                    style: {
                                        color: color
                                    }
                                },params.row.procinstState == 1 ? '审批中': params.row.procinstState == 2 ? '被退回': params.row.procinstState == 3 ? '审批完成': params.row.procinstState == 5? '已终止' : '未上报' || '--')
                            ]);
                        }
                    },
                    {
                        width: 200,
                        minWidth: 150,
                        title: '企业名称',
                        align: 'center',
                        key: 'contractorName',
                    },
                    {
                        width: 200,
                        minWidth: 150,
                        title: '所属单位',
                        align: 'center',
                        key: 'companyName',
                    },
                    {
                        width: 150,
                        title: '准入类别',
                        align: 'center',
                        key: 'admittanceOrg',
                    },
                    {
                        minWidth: 150,
                        title: '通知文件',
                        align: 'center',
                        key: 'informFile',
                        tooltip: true
                    },
                    {
                        width: 130,
                        title: '禁入开始时间',
                        align: 'center',sortable: "custom",
                        key: 'banStart',
                        render: (h, params) => {
                            let banStart = new Date(params.row.banStart);
                            return h('span', banStart.getFullYear() + '-' + (banStart.getMonth() + 1) + '-' + banStart.getDate())
                        }
                    },
                    {
                        width: 130,
                        title: '禁入结束时间',
                        align: 'center',sortable: "custom",
                        key: 'banEnd',
                        render: (h, params) => {
                            let banEnd = new Date(params.row.banEnd);
                            return h('span', banEnd.getFullYear() + '-' + (banEnd.getMonth() + 1) + '-' + banEnd.getDate())
                        }
                    },
                    {
                        title: '操作',
                        key: 'action',
                        fixed: 'right',
                        width: 260,
                        align: 'center',
                        render: (h, params) => {

                            let status = true;

                            if((params.row.createUserId == sessionStorage('userId').getObject('userId').userId ||  this.Common.userIdList.includes(sessionStorage('userId').getObject('userId').userId )||sessionStorage('userId').getObject('userId').userRole.find(obj => obj.roleId == '73b38b37dff64392ba0ee7dd579bf293') != undefined
                                ||sessionStorage('userId').getObject('userId').userBeHandedOver.find(obj => obj == params.row.createUserId) != undefined)){
                                if(params.row.procinstState == "1" || params.row.procinstState == "2" || params.row.procinstState == "3"){
                                    status = true;
                                }else{
                                    status = false;
                                }
                            }

                            return h('div', [
                                h('A', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        fontSize: '14px',
                                    },
                                    on: {
                                        click: () => {
                                            this.InputData = params.row;
                                            let banStart = new Date(this.InputData.banStart)
                                            let banEnd = new Date(this.InputData.banEnd)
                                            this.banStart = banStart.getFullYear() + '-' + (banStart.getMonth() + 1) + '-' + banStart.getDate()
                                            this.banEnd = banEnd.getFullYear() + '-' + (banEnd.getMonth() + 1) + '-' + banEnd.getDate()
                                            this.model3 = true;
                                        }
                                    }
                                }, '详情'),
                                h('Divider', {
                                    props: {
                                        type: 'vertical',
                                    }
                                }, ''),
                                h('A', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        fontSize: '14px',
                                        color: status ? '#d0d0d0': '',
                                        pointerEvents: status ? 'none' : ''
                                    },
                                    on: {
                                        click: () => {
                                            this.InputData = params.row;
                                            this.model1 = true;
                                            this.add = false
                                        }
                                    }
                                }, '修改'),
                                h('Divider', {
                                    props: {
                                        type: 'vertical',
                                    }
                                }, ''),
                                h('A', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        fontSize: '14px',
                                        color: status ? '#d0d0d0': '',
                                        pointerEvents: status ? 'none' : ''
                                    },
                                    on: {
                                        click: () => {
                                            this.$Modal.confirm({
                                                title: '提示',
                                                content: '<p>确认上报此行数据？</p>',
                                                onOk: () => {
                                                    let data = {
                                                        key: 'interestedPartiesBlack',
                                                        procinstName: '相关方黑名单审批流程',
                                                        createUserId: sessionStorage('userId').getObject('userId').userId,
                                                        userName: sessionStorage('userId').getObject('userId').userName,
                                                        workId: params.row.blackId,
                                                        formKey: 'interestedPartiesBlackForm'
                                                    }

                                                    this.$http.post(Api.submit, data).then(function(res){
                                                        this.$Message.success({
                                                            content: '上报成功',
                                                            duration: 4
                                                        });
                                                        this.buttonLoading = false;
                                                        this.query();
                                                    }, function(res){
                                                        this.$Message.error({
                                                            content: '上报失败',
                                                            duration: 4
                                                        });
                                                    });
                                                },
                                                onCancel: () => {
                                                }
                                            });
                                        }
                                    }
                                }, '上报'),
                                h('Divider', {
                                    props: {
                                        type: 'vertical',
                                    }
                                }, ''),
                                h('A', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        fontSize: '14px',
                                        color: params.row.procinstState == "1" || params.row.procinstState == "2" || params.row.procinstState == "3"|| params.row.procinstState == "5"? '' : '#d0d0d0',
                                        pointerEvents: params.row.procinstState == "1" || params.row.procinstState == "2" || params.row.procinstState == "3"|| params.row.procinstState == "5" ? '' : 'none'
                                    },
                                    on: {
                                        click: () => {
                                            this.imgUrl = Api.getFlowImg + '/' + params.row.procinstId
                                            this.queryHistory(params.row);
                                            this.modal3 = true;
                                        }
                                    }
                                }, '流程图'),
                                h('Divider', {
                                    props: {
                                        type: 'vertical',
                                    }
                                }, ''),
                                h('A', {
                                    props: {
                                        type: 'error',
                                        size: 'small'
                                    },
                                    style: {
                                        fontSize: '14px',
                                        color: !status ? 'red': '#d0d0d0',
                                        pointerEvents: !status ? '' : 'none'
                                    },
                                    on: {
                                        click: () => {
                                            this.deleteData(params.row);
                                        }
                                    }
                                }, '删除')
                            ]);
                        }
                    }
                ],
                add: false,
                InputData: {},
                buttonLoading: false,
                banStart: '',
                banEnd: '',
                pageModel2: {
                    total: 0,
                    pageSize: 10,
                    currentPage: 1,
                    contractorName: ''
                },
                contractor: [],
                columns2: [
                    {
                        title: "序号",
                        width: 80,
                        align: "center",
                        fixed: 'left',
                        render: (h, params) => {
                            return h('span', params.index + (this.pageModel2.currentPage - 1) * this.pageModel2.pageSize + 1);
                        }
                    },
                    {
                        minWidth: 150,
                        title: '企业名称',
                        align: 'center',
                        key: 'contractorName',
                    },
                    {
                        minWidth: 150,
                        title: '企业性质',
                        align: 'center',
                        key: 'propertyName',
                    },
                    {
                        minWidth: 150,
                        title: '法定代表人',
                        align: 'center',
                        key: 'legalPerson',
                    },
                    {
                        minWidth: 150,
                        title: '注册资本',
                        align: 'center',
                        key: 'capital',
                    },
                    {
                        minWidth: 150,
                        title: '统一社会信用代码',
                        align: 'center',
                        key: 'unifyCode',
                    },
                    {
                        title: '操作',
                        align: 'center',
                        key: 'view',
                        fixed: 'right',
                        minWidth: 80,
                        render: (h, params) => {
                            return h('div', [
                                h('A', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        fontSize: '14px'
                                    },
                                    on: {
                                        click: () => {
                                            this.InputData.contractorId = params.row.accountId;
                                            this.InputData.contractorName = params.row.contractorName;
                                            this.model2 = false;
                                        }
                                    }
                                }, '选择'),
                            ]);
                        }
                    }
                ],
                model2: false,
                model1: false,
                model3: false,
                companyId: '',
                loading3: false,
                infos3: [],
                historyColumns: [
                    {
                        type: 'index',
                        title: '序号',
                        width: 80,
                        align: 'center',
                    },
                    {
                        width: 180,
                        title: '审批时间',
                        key: 'endTime',
                        align: 'center',
                    },
                    {
                        width: 185,
                        title: '节点名称',
                        key: 'name',
                        align: 'center',
                    },
                    {
                        width: 120,
                        title: '审批人',
                        key: 'userName',
                        align: 'center'
                    },
                    {
                        width: 100,
                        title: '审批意见',
                        key: 'route',
                        align: 'center'
                    },
                    {
                        width: 200,
                        title: '备注',
                        key: 'opinions',
                        align: 'center'
                    },
                ],
                imgUrl: '',
                modal3: false
            }
        },
        mounted() {
            this.companyId = sessionStorage('userId').getObject('userId').companyId
            this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 145;
            this.query()
        },
        methods: {
            sortChange(data) {
                if (data.order === 'asc'||data.order ==='desc') {
                    let order = data.key
                    this.form1.dynamicSort = order +' '+ data.order
                    this.query()
                }
            },
            /* baocun() {
                 this.InputData.contractorId = this.InputData1.contractorId
                 this.InputData.contractorName = this.InputData1.contractorName
                 this.model2 = false
             },*/
            // danxuan(row, index) {
            //     this.InputData.contractorId = row.contractorId
            //     this.InputData.contractorName = row.contractorName
            //     this.model2 = false
            //     this.model1 = true
            // },
            selectContractor() {
                this.loading = true;
                this.model2 = true
                this.contractor = []
                let data = {
                    startPage: this.pageModel2.currentPage,
                    size: this.pageModel2.pageSize,
                    contractorName: this.pageModel2.contractorName,
                    orgId:sessionStorage('userId').getObject('userId').companyId
                }
                data = Object.assign(data);
                let url = Api.interestedPartiesEvaluateBookList
                this.$http.get(url, {params: data}).then((res) => {
                    console.log(res.data);
                    this.contractor = res.data.data.data;
                    this.pageModel2.total = res.data.data.totalSize;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },

            onCancel() {
                this.InputData = {}
                this.model1 = false
                this.model3 = false
                this.query()
            },
            submit(name) {
                this.$refs[name].validate((valid) => {
                    if (valid) {
                        this.buttonLoading = true
                        if (this.add) {
                            let url = Api.interestedPartiesBlackAdd
                            this.InputData.bsflag = '0'
                            this.InputData.createOrgId = sessionStorage('userId').getObject('userId').orgInfo.orgId
                            this.InputData.createUserId = sessionStorage('userId').getObject('userId').userId
                            this.$http.post(url, this.InputData).then((res) => {
                                this.$Message.success('成功');
                                this.query()
                                this.buttonLoading = false
                                this.model1 = false
                            }).catch(e => {
                                this.$Message.error('请求失败');
                            })
                        } else {
                            let url = Api.interestedPartiesBlackUpdate;
                            this.InputData.updateUserId = sessionStorage('userId').getObject('userId').userId
                            this.InputData.updateOrgId = sessionStorage('userId').getObject('userId').orgInfo.orgId
                            this.$http.post(url, this.InputData).then((res) => {
                                this.$Message.success('成功');
                                this.buttonLoading = false
                                this.model1 = false
                                this.query()
                            }).catch(e => {
                                this.$Message.error('请求失败');
                            })
                        }
                    } else {
                        this.$Message.error('失败!');
                    }
                })

            },

            deleteData(row) {
                this.$Modal.confirm({
                    title: '提示',
                    content: '<p>确认删除此行数据？</p>',
                    onOk: () => {
                        let url = Api.interestedPartiesBlackDelete + '/' + row.blackId
                        this.$http.delete(url).then((res) => {
                            this.$Message.success('成功');
                            this.query()
                        }).catch(e => {
                            this.$Message.error("数据获取失败")
                        })
                    },
                    onCancel: () => {
                        }
                    });
            },
            addInfo() {
                this.add = true;
                this.InputData = {};
                this.model1 = true;
            },
            query() {
                this.loading = true;
                let data = {
                    starPage: this.pagedata.currentPage,
                    size: this.pagedata.pageSize
                }
                if (this.form1.orgId == '') {
                    this.form1.orgId = this.companyId
                }
                data = Object.assign(data, JSON.parse(JSON.stringify(this.form1)));
                let url = Api.interestedPartiesBlackList
                this.$http.get(url, {params: data}).then((res) => {
                    console.log(res.data);
                    this.dataTable = res.data.data.data;
                    this.pagedata.total = res.data.data.totalSize;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            reset() {
                this.form1 = {
                    admittanceOrg: '',
                    contractorName: '',
                    orgId: '',
                    orgName: ''
                }
                this.pageModel2.currentPage = 1;
                this.pageModel2.contractorName = ''
                this.$refs.childOrg && this.$refs.childOrg.resetCurrentOrg();
                this.query();
            },
            switchQuery(flag) {
                this.switchFlag = flag;
                if (!this.switchFlag) {
                    this.tableHeight = this.tableHeight + 44;
                } else {
                    this.tableHeight = this.tableHeight - 44;
                }
            },
            setOrgId(data) {
                this.form1.orgId = data[data.length - 1];
            },
            setOrgName(data) {
                this.form1.orgName = data;
            },
            pageChange1(pageNum) {
                this.pageModel2.currentPage = pageNum;
                this.selectContractor();
            },
            pageSizeChange1(pageSize) {
                this.pageModel2.pageSize = pageSize;
                this.selectContractor();
            },
            pageChange(pageNum) {
                this.pagedata.currentPage = pageNum;
                this.query();
            },
            pageSizeChange(pageSize) {
                this.pagedata.pageSize = pageSize;
                this.query();
            },
            queryHistory(row){
                this.loading3 = true;
                this.$http.get(Api.getHistory + '/' + row.procinstId, {params: {}}).then((res) => {
                    this.infos3 = res.data;
                    this.loading3 = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
        }
    }
</script>

<style scoped>
  @import '../../../index.css';

</style>
